package com.wnhz.wnmap.cinema.controller;

import com.wnhz.wnmap.common.result.HttpResp;
import com.wnhz.wnmap.smovie.genre.api.IGenreFeign;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "影院模块接口")
@RestController
@RequestMapping("api/cinema")
public class CinemaController {
    @Autowired
    private IGenreFeign igf;

    @ApiOperation(value = "checkGenreInThisCinema",notes= "查询本地影院的电影类型接口")
    @GetMapping("checkGenreInThisCinema")
    public HttpResp checkGenreInThisCinema(){
        HttpResp allGenres = igf.findAllGenres();
        allGenres.setMsg("磐石影院-->查询电影类型 ");
        return allGenres;
    }

    @ApiOperation(value = "checkGenreByNameInThisCinema",notes= "模糊查询本地影院的电影类型接口")
    @GetMapping("checkGenreByNameInThisCinema")
    public HttpResp checkGenreByNameInThisCinema(String name){
        HttpResp allGenres = igf.findGenreByName(name);
        allGenres.setMsg("磐石影院-->模糊查询电影类型 ");
        return allGenres;
    }

}
